{% extends "layout.html" %}

{% block content %}
<a id="phpMyAdminUrl" class="hide" data-url="{{session.phpmyadminDir}}"></a>
<div class="main-content pb55">
    <div class="container-fluid">
        <div class="pos-box bgw mtb15 ">
          <div class="tab-list">
            <div class="tabs-item active">{{data['lan']['H2']}}</div>
          </div>
        </div>
        <div class="safe bgw mtb15 pd15 tab-view-box">
            <div id="bt_database_table"></div>
        </div>
        <form id="toPHPMyAdmin" public-data="/phpmyadmin/index.php" action="/phpmyadmin/index.php" method="post" style="display: none;" target="_blank">
            <input type="text" name="pma_username" id="pma_username" value="" />
            <input type="password" name="pma_password" id="pma_password" value="" />
            <input type="text" name="server" value="1" />
            <input type="text" name="target" value="index.php" />
            <input type="text" name="db" id="db" value="" />
        </form>
    </div>
</div>
{% endblock %}
{% block scripts %}
{{ super() }} 
<script type="text/javascript" src="{{g.cdn_url}}/js/bt_upload.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/database.js?date={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript">
    bt.set_cookie('backup_path', "{{session['config']['backup_path']}}");
	{% if not data['isSetup'] %}
		// layer.msg('{{data["lan"]["JS1"]}}<a href="/soft#i" style="color:#20a53a;float: right;">{{data["lan"]["JS2"]}}</a>',{icon:7,shade: [0.3, '#000'],time:0});
        // $(".layui-layer-shade").css("margin-left", "180px");
        setTimeout(function(){
            $("button[title='phpMyAdmin']").hide();
            $("button[title='root密码']").hide();
            $("button[title='回收站']").hide();
            layer.msg('未安装本地数据库，已隐藏无法使用的功能!',{time:2000})
        },500)

    // {% else %}
    	// database.get_list();
    {% endif %}
</script>
<!-- <script src="{{g.cdn_url}}/js/upload.js?date={{g['version']}}"></script> -->
{% endblock %}